package com.hanscan.gui;

import com.hanscan.persistence.controllers.CompanyJpaController;
import com.hanscan.persistence.controllers.UserJpaController;
import com.hanscan.persistence.controllers.UserTypeJpaController;
import com.hanscan.persistence.controllers.exceptions.NonexistentEntityException;
import com.hanscan.persistence.entities.Company;
import com.hanscan.persistence.entities.User;
import com.hanscan.persistence.entities.UserType;
import com.hanscan.util.language.LanguageConfig;
import com.icesoft.faces.component.ext.HtmlCommandButton;
import com.icesoft.faces.component.ext.HtmlInputText;
import com.icesoft.faces.component.ext.HtmlOutputLabel;
import com.icesoft.faces.component.ext.HtmlPanelGrid;
import com.icesoft.faces.component.ext.HtmlInputSecret;
import com.icesoft.faces.component.ext.RowSelectorEvent;
import com.icesoft.faces.component.panelstack.PanelStack;
import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
import java.util.ArrayList;
import java.util.List;
import javax.faces.FacesException;
import javax.faces.event.ActionEvent;


public class ManagementCompanies extends AbstractFragmentBean
{
    private PanelStack panelStack = new PanelStack();
    private PanelStack panelStackMainMenu = new PanelStack();

    private HtmlOutputLabel labelMenssage = new HtmlOutputLabel();
    private HtmlOutputLabel labelTitle = new HtmlOutputLabel();
    private HtmlOutputLabel labelName = new HtmlOutputLabel();
    private HtmlOutputLabel labelFilterByName = new HtmlOutputLabel();
    private HtmlOutputLabel labelNameBaja = new HtmlOutputLabel();
    private HtmlOutputLabel labelTextNameBaja = new HtmlOutputLabel();
    private HtmlOutputLabel labelNameEdit = new HtmlOutputLabel();
    private HtmlOutputLabel labelNameAdministrator = new HtmlOutputLabel();
    private HtmlOutputLabel labelSurname1 = new HtmlOutputLabel();
    private HtmlOutputLabel labelSurname2 = new HtmlOutputLabel();
    private HtmlOutputLabel labelNumber = new HtmlOutputLabel();
    private HtmlOutputLabel labelNSP = new HtmlOutputLabel();
    private HtmlOutputLabel labelPhone = new HtmlOutputLabel();
    private HtmlOutputLabel labelMail = new HtmlOutputLabel();
    private HtmlOutputLabel labelStreetAndNumber = new HtmlOutputLabel();
    private HtmlOutputLabel labelZipCode = new HtmlOutputLabel();
    private HtmlOutputLabel labelProvince = new HtmlOutputLabel();
    private HtmlOutputLabel labelCity = new HtmlOutputLabel();
    private HtmlOutputLabel labelCountry = new HtmlOutputLabel();
    private HtmlOutputLabel labelUserLogin = new HtmlOutputLabel();
    private HtmlOutputLabel labelPassword = new HtmlOutputLabel();
    private HtmlOutputLabel labelConfirmPassword = new HtmlOutputLabel();

    private int estado = 0;

    private HtmlInputText inputTextName = new HtmlInputText();
    private HtmlInputText inputTextFilterByName = new HtmlInputText();
    private HtmlInputText inputTextNameEdit = new HtmlInputText();
    private HtmlInputText inputTextNameAdministrador = new HtmlInputText();
    private HtmlInputText inputTextSurname1 = new HtmlInputText();
    private HtmlInputText inputTextSurname2 = new HtmlInputText();
    private HtmlInputText inputTextPhone = new HtmlInputText();
    private HtmlInputText inputTextMail = new HtmlInputText();
    private HtmlInputText inputTextStreetAndNumber = new HtmlInputText();
    private HtmlInputText inputTextZipCode = new HtmlInputText();
    private HtmlInputText inputTextProvince = new HtmlInputText();
    private HtmlInputText inputTextCity = new HtmlInputText();
    private HtmlInputText inputTextCountry = new HtmlInputText();
    private HtmlInputText inputTextUserLogin = new HtmlInputText();
    private HtmlInputSecret inputTextPassword = new HtmlInputSecret();
    private HtmlInputSecret inputTextConfirmPassword = new HtmlInputSecret();

    private HtmlCommandButton btnSaveCompany = new HtmlCommandButton();
    private HtmlCommandButton btnSearchUser = new HtmlCommandButton();
    private HtmlCommandButton btnAdd = new HtmlCommandButton();
    private HtmlCommandButton btnEdit = new HtmlCommandButton();
    private HtmlCommandButton btnRemove = new HtmlCommandButton();
    private HtmlCommandButton btnRemoveCompany = new HtmlCommandButton();
    private HtmlCommandButton btnEditCompany = new HtmlCommandButton();
    private HtmlCommandButton btnCreateUser = new HtmlCommandButton();

    private HtmlPanelGrid containerSearch = new HtmlPanelGrid();
    private HtmlPanelGrid containerFilter = new HtmlPanelGrid();

    private Company[] companies;
    private boolean ascending;
    private Company company = new Company();

    private String sortColumnName;
    private String clientNameHeader;

    private String colorEmptyField = "background-color:rgba(255, 0, 0, 0.5);";


    private void _init() throws Exception
    {
        loadLanguage(getSessionBean1().getSessionBeanLanguage());
    }

    public ManagementCompanies()
    {
    }

    protected void loadLanguage(LanguageConfig languageConfig)
    {
        btnAdd.setValue(languageConfig.getProperty("Nuevo"));
        btnEdit.setValue(languageConfig.getProperty("Modificar"));
        btnRemove.setValue(languageConfig.getProperty("Suprimir"));
        labelName.setValue(languageConfig.getProperty("Nombre") + " " + "*");
        btnSearchUser.setValue(languageConfig.getProperty("Buscar"));
        labelFilterByName.setValue(languageConfig.getProperty("Nombre"));
        btnSaveCompany.setValue(languageConfig.getProperty("Guardar"));
        clientNameHeader = languageConfig.getProperty("Nombre");
        labelNameBaja.setValue(languageConfig.getProperty("Nombre"));
        labelNameEdit.setValue(languageConfig.getProperty("Nombre"));
        btnEditCompany.setValue(languageConfig.getProperty("Editar"));
        btnRemoveCompany.setValue(languageConfig.getProperty("Borrar"));
        labelMenssage.setValue(languageConfig.getProperty("Empresas"));       
        labelNameAdministrator.setValue(languageConfig.getProperty("Nombre") + " " + "*");
        labelSurname1.setValue(languageConfig.getProperty("Primer_Apellido") +
                " " + "*");
        labelSurname2.setValue(languageConfig.getProperty("Segundo_Apellido"));
        labelNumber.setValue(languageConfig.getProperty("N_Usuario") + " " + "*");
        labelPhone.setValue(languageConfig.getProperty("Telefono1"));
        labelMail.setValue(languageConfig.getProperty("Email1"));
        labelStreetAndNumber.setValue(languageConfig.getProperty("Calle"));
        labelZipCode.setValue(languageConfig.getProperty("C_Postal"));
        labelProvince.setValue(languageConfig.getProperty("Provincia"));
        labelCity.setValue(languageConfig.getProperty("Ciudad"));
        labelCountry.setValue(languageConfig.getProperty("Pais"));
        labelUserLogin.setValue(languageConfig.getProperty("Nombre_De_Usuario"));
        labelPassword.setValue(languageConfig.getProperty("Password"));
        labelConfirmPassword.setValue(languageConfig.getProperty("Confirm_Password"));
        btnCreateUser.setValue(languageConfig.getProperty("Crear"));       
    }

    public void rowSelectionListener(RowSelectorEvent event)
    {
        company = companies[event.getRow()];

        if(estado == 1)
        {
            labelTextNameBaja.setValue(company.getCompanyName());
            panelStackMainMenu.setSelectedPanel("panelCompanieData");
            panelStack.setSelectedPanel("panelRemoveCompany");          
        }

        if(estado == 2)
        {
            inputTextNameEdit.setValue(company.getCompanyName());
            panelStackMainMenu.setSelectedPanel("panelCompanieData");
            panelStack.setSelectedPanel("panelEditCompany");
        }
        containerSearch.setRendered(false);
        containerFilter.setRendered(false);
    }

    public String btnAdd_action(ActionEvent e)
    {
        estado = 0;
        labelMenssage.setValue("Alta Empresa");
        panelStackMainMenu.setSelectedPanel("panelCompanieData");
        panelStack.setSelectedPanel("panelAddCompany");
        return null;
    }

    public String btnCreateUser_action(ActionEvent e)
    {
       User user = addUser();
       UserJpaController userJpaController = new UserJpaController();
        try
        {
            userJpaController.create(user);
            //TODO
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
            //TODO
        }
       return null;
    }

    /**
     *
     * @param inputText
     */
    public void initColorInputText(HtmlInputText inputText)
    {
        inputText.setStyle("");
    }

    /**
     *
     * @param inputText
     */
    public void changeColorInputText(HtmlInputText inputText)
    {
        if (inputText.getText().equals(""))
        {
            inputText.setStyle(colorEmptyField);
        }
        else
        {
            inputText.setStyle("");
        }
    }

    private String generatePass()
    {
        String pass ="";
        int longitud = 8;
        String base = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        for(int i=0; i<longitud;i++)
        {
            int numero = (int)(Math.random()*(longitud));
            String caracter=base.substring(numero, numero+1);
            pass=pass+caracter;
        }
        return pass;
    }

    /**
     *
     * @return
     */
    public User addUser()
    {
        User user = new User();

        initColorInputText(inputTextName);
        initColorInputText(inputTextSurname1);

        if ((inputTextName.getText().equals("")) ||
                (inputTextSurname1.getText().equals("")))
        {
            changeColorInputText(inputTextName);
            changeColorInputText(inputTextSurname1);
            return null;
        }
        user.setName(String.valueOf(inputTextName.getText()));
        user.setSurname1(String.valueOf(inputTextSurname1.getValue()));
        user.setSurname2(String.valueOf(inputTextSurname2.getValue()));
        user.setTelephone(String.valueOf(inputTextPhone.getValue()));
        user.setEmail(String.valueOf(inputTextMail.getValue()));
        user.setAddress(String.valueOf(inputTextStreetAndNumber.getValue()));
        user.setZipCode(String.valueOf(inputTextZipCode.getValue()));
        user.setProvince(String.valueOf(inputTextProvince.getValue()));
        user.setCity(String.valueOf(inputTextCity.getValue()));
        user.setCountry(String.valueOf(inputTextCountry.getValue()));
        user.setClientLogin(inputTextUserLogin.getText());
        user.setClientPassword(String.valueOf(inputTextPassword.getValue()));
        user.setMan(true);
        user.setNsp(labelNSP.getValue().toString());
        UserTypeJpaController userTypeJpaController = new UserTypeJpaController();
        UserType userType = userTypeJpaController.findUserTypeById(1);
        user.setUserType(userType);
        return user;
    }

    public String btnRemove_action(ActionEvent e)
    {
        estado = 1;
        labelMenssage.setValue("Borrar Empresa");
        containerFilter.setRendered(true);
        panelStackMainMenu.setSelectedPanel("panelFilter");
        return null;
    }

    public String btnEdit_action(ActionEvent e)
    {
        estado = 2;
        labelMenssage.setValue("Editar Empresa");
        containerFilter.setRendered(true);
        panelStackMainMenu.setSelectedPanel("panelFilter");
        containerSearch.setRendered(false);
        return null;
    }

    public String btnRemoveCompany_action(ActionEvent e)
    {
        try
        {
            CompanyJpaController companyJpaController = new CompanyJpaController();
            companyJpaController.destroy(company);
            containerSearch.setRendered(false);
//     TODO       panelPopupPruebaBean.setShowModalPanel(true);
//            messageHeader = "Informacion";
//            messageText = "Operación realizada correctamente";
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
//     TODO       panelPopupPruebaBean.setShowModalPanel(true);
//            messageHeader = "Error";
//            messageText = "Error al borrar de base de datos";
        }
        return null;
    }

    public String btnEditCompany_action(ActionEvent e)
    {
        try
        {
            CompanyJpaController companyJpaController = new CompanyJpaController();
            company.setCompanyName(inputTextNameEdit.getValue().toString());
            companyJpaController.edit(company);
//     TODO       panelPopupPruebaBean.setShowModalPanel(true);
//            messageHeader = "Informacion";
//            messageText = "Operación realizada correctamente";
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
//     TODO       panelPopupPruebaBean.setShowModalPanel(true);
//            messageHeader = "Error";
//            messageText = "Error al borrar de base de datos";
        }
        return null;
    }


    public String btnSaveCompany_action(ActionEvent e)
    {
        CompanyJpaController companyJpaController = new CompanyJpaController();
        Company auxCompany = new Company();
        auxCompany.setCompanyName(inputTextName.getValue().toString());
        companyJpaController.create(auxCompany);
        labelMenssage.setValue("Alta Empresa - alta de administrador");
        panelStack.setSelectedPanel("panelAddAdministrator");
        labelNSP.setValue(generatePass());      
        return null;
    }

    public String btnSearchUser_action(ActionEvent e)
    {
        String busqueda = inputTextFilterByName.getValue().toString();
        List<Company> listCompany = new ArrayList();

        if(busqueda.equals(""))
        {
            try 
            {
                CompanyJpaController companyJpaController = new CompanyJpaController();
                listCompany = companyJpaController.getAllCompaniesOrderByName();
                companies = new Company[listCompany.size()];
                for(int i = 0; i < listCompany.size(); i++)
                {
                   companies[i] =  listCompany.get(i);
                }
                
            }
            catch (NonexistentEntityException ex)
            {
               ex.printStackTrace();
//      TODO         panelPopupPruebaBean.setShowModalPanel(true);
//               messageHeader = "Error";
//               messageText = "Error en la busqueda de base de datos";
            }
        }
        else
        {
            try
            {
                CompanyJpaController companyJpaController = new CompanyJpaController();
                listCompany = companyJpaController.findCompanyByName(busqueda);
                companies = new Company[listCompany.size()];
                for(int i = 0; i < listCompany.size(); i++)
                {
                   companies[i] =  listCompany.get(i);
                }
            }
            catch (NonexistentEntityException ex)
            {
                ex.printStackTrace();
//   TODO             panelPopupPruebaBean.setShowModalPanel(true);
//                messageHeader = "Error";
//                messageText = "Error en al busqueda de base de datos";
            }

        }
        containerSearch.setRendered(true);
        return null;
    }


    @Override
    public void init()
    {
        super.init();
        try
        {
            _init();
        } 
        catch (Exception e)
        {
            log("Page1 Initialization Failure", e);
            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
        }
    }

    @Override
    public void destroy()
    {
    }

    //////////////////////////////////////////////////////////
    /*GETTER y SETTER*/
    //////////////////////////////////////////////////////////

    protected RequestBean1 getRequestBean1()
    {
        return (RequestBean1) getBean("RequestBean1");
    }

    protected SessionBean1 getSessionBean1()
    {
        return (SessionBean1) getBean("SessionBean1");
    }

    protected ApplicationBean1 getApplicationBean1()
    {
        return (ApplicationBean1) getBean("ApplicationBean1");
    }

    public HtmlInputText getInputTextName() {
        return inputTextName;
    }

    public void setInputTextName(HtmlInputText inputTextName) {
        this.inputTextName = inputTextName;
    }

    public HtmlOutputLabel getLabelMenssage() {
        return labelMenssage;
    }

    public void setLabelMenssage(HtmlOutputLabel labelMenssage) {
        this.labelMenssage = labelMenssage;
    }

    public HtmlOutputLabel getLabelName() {
        return labelName;
    }

    public void setLabelName(HtmlOutputLabel labelName) {
        this.labelName = labelName;
    }

    public PanelStack getPanelStack() {
        return panelStack;
    }

    public void setPanelStack(PanelStack panelStack) {
        this.panelStack = panelStack;
    }

    public HtmlCommandButton getBtnSaveCompany() {
        return btnSaveCompany;
    }

    public void setBtnSaveCompany(HtmlCommandButton btnSaveCompany) {
        this.btnSaveCompany = btnSaveCompany;
    }

    public HtmlCommandButton getBtnAdd() {
        return btnAdd;
    }

    public void setBtnAdd(HtmlCommandButton btnAdd) {
        this.btnAdd = btnAdd;
    }

    public HtmlCommandButton getBtnEdit() {
        return btnEdit;
    }

    public void setBtnEdit(HtmlCommandButton btnEdit) {
        this.btnEdit = btnEdit;
    }

    public HtmlCommandButton getBtnRemove() {
        return btnRemove;
    }

    public void setBtnRemove(HtmlCommandButton btnRemove) {
        this.btnRemove = btnRemove;
    }

    public HtmlOutputLabel getLabelTitle() {
        return labelTitle;
    }

    public void setLabelTitle(HtmlOutputLabel labelTitle) {
        this.labelTitle = labelTitle;
    }

    public HtmlCommandButton getBtnSearchUser() {
        return btnSearchUser;
    }

    public void setBtnSearchUser(HtmlCommandButton btnSearchUser) {
        this.btnSearchUser = btnSearchUser;
    }

    public HtmlInputText getInputTextFilterByName() {
        return inputTextFilterByName;
    }

    public void setInputTextFilterByName(HtmlInputText inputTextFilterByName) {
        this.inputTextFilterByName = inputTextFilterByName;
    }

    public HtmlOutputLabel getLabelFilterByName() {
        return labelFilterByName;
    }

    public void setLabelFilterByName(HtmlOutputLabel labelFilterByName) {
        this.labelFilterByName = labelFilterByName;
    }

    public HtmlPanelGrid getContainerFilter() {
        return containerFilter;
    }

    public void setContainerFilter(HtmlPanelGrid containerFilter) {
        this.containerFilter = containerFilter;
    }

    public HtmlPanelGrid getContainerSearch() {
        return containerSearch;
    }

    public void setContainerSearch(HtmlPanelGrid containerSearch) {
        this.containerSearch = containerSearch;
    }

    public boolean isAscending() {
        return ascending;
    }

    public void setAscending(boolean ascending) {
        this.ascending = ascending;
    }

    public Company[] getCompanies() {
        return companies;
    }

    public void setCompanies(Company[] companies) {
        this.companies = companies;
    }

    public String getSortColumnName() {
        return sortColumnName;
    }

    public void setSortColumnName(String sortColumnName) {
        this.sortColumnName = sortColumnName;
    }

    public String getClientNameHeader() {
        return clientNameHeader;
    }

    public void setClientNameHeader(String clientNameHeader) {
        this.clientNameHeader = clientNameHeader;
    }

    public HtmlCommandButton getBtnEditCompany() {
        return btnEditCompany;
    }

    public void setBtnEditCompany(HtmlCommandButton btnEditCompany) {
        this.btnEditCompany = btnEditCompany;
    }

    public HtmlCommandButton getBtnRemoveCompany() {
        return btnRemoveCompany;
    }

    public void setBtnRemoveCompany(HtmlCommandButton btnRemoveCompany) {
        this.btnRemoveCompany = btnRemoveCompany;
    }

    public HtmlOutputLabel getLabelNameBaja() {
        return labelNameBaja;
    }

    public void setLabelNameBaja(HtmlOutputLabel labelNameBaja) {
        this.labelNameBaja = labelNameBaja;
    }

    public HtmlOutputLabel getLabelTextNameBaja() {
        return labelTextNameBaja;
    }

    public void setLabelTextNameBaja(HtmlOutputLabel labelTextNameBaja) {
        this.labelTextNameBaja = labelTextNameBaja;
    }

    public HtmlInputText getInputTextNameEdit() {
        return inputTextNameEdit;
    }

    public void setInputTextNameEdit(HtmlInputText inputTextNameEdit) {
        this.inputTextNameEdit = inputTextNameEdit;
    }  

    public HtmlOutputLabel getLabelNameEdit() {
        return labelNameEdit;
    }

    public void setLabelNameEdit(HtmlOutputLabel labelNameEdit) {
        this.labelNameEdit = labelNameEdit;
    }

    public PanelStack getPanelStackMainMenu() {
        return panelStackMainMenu;
    }

    public void setPanelStackMainMenu(PanelStack panelStackMainMenu) {
        this.panelStackMainMenu = panelStackMainMenu;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    public int getEstado() {
        return estado;
    }

    public void setEstado(int estado) {
        this.estado = estado;
    }

    public HtmlInputText getInputTextCity() {
        return inputTextCity;
    }

    public void setInputTextCity(HtmlInputText inputTextCity) {
        this.inputTextCity = inputTextCity;
    }

    public HtmlInputSecret getInputTextConfirmPassword() {
        return inputTextConfirmPassword;
    }

    public void setInputTextConfirmPassword(HtmlInputSecret inputTextConfirmPassword) {
        this.inputTextConfirmPassword = inputTextConfirmPassword;
    }

    public HtmlInputText getInputTextCountry() {
        return inputTextCountry;
    }

    public void setInputTextCountry(HtmlInputText inputTextCountry) {
        this.inputTextCountry = inputTextCountry;
    }

    public HtmlInputText getInputTextMail() {
        return inputTextMail;
    }

    public void setInputTextMail(HtmlInputText inputTextMail) {
        this.inputTextMail = inputTextMail;
    }

    public HtmlInputText getInputTextNameAdministrador() {
        return inputTextNameAdministrador;
    }

    public void setInputTextNameAdministrador(HtmlInputText inputTextNameAdministrador) {
        this.inputTextNameAdministrador = inputTextNameAdministrador;
    }

    public HtmlInputSecret getInputTextPassword() {
        return inputTextPassword;
    }

    public void setInputTextPassword(HtmlInputSecret inputTextPassword) {
        this.inputTextPassword = inputTextPassword;
    }

    public HtmlInputText getInputTextPhone() {
        return inputTextPhone;
    }

    public void setInputTextPhone(HtmlInputText inputTextPhone) {
        this.inputTextPhone = inputTextPhone;
    }

    public HtmlInputText getInputTextProvince() {
        return inputTextProvince;
    }

    public void setInputTextProvince(HtmlInputText inputTextProvince) {
        this.inputTextProvince = inputTextProvince;
    }

    public HtmlInputText getInputTextStreetAndNumber() {
        return inputTextStreetAndNumber;
    }

    public void setInputTextStreetAndNumber(HtmlInputText inputTextStreetAndNumber) {
        this.inputTextStreetAndNumber = inputTextStreetAndNumber;
    }

    public HtmlInputText getInputTextSurname1() {
        return inputTextSurname1;
    }

    public void setInputTextSurname1(HtmlInputText inputTextSurname1) {
        this.inputTextSurname1 = inputTextSurname1;
    }

    public HtmlInputText getInputTextSurname2() {
        return inputTextSurname2;
    }

    public void setInputTextSurname2(HtmlInputText inputTextSurname2) {
        this.inputTextSurname2 = inputTextSurname2;
    }

    public HtmlInputText getInputTextUserLogin() {
        return inputTextUserLogin;
    }

    public void setInputTextUserLogin(HtmlInputText inputTextUserLogin) {
        this.inputTextUserLogin = inputTextUserLogin;
    }

    public HtmlInputText getInputTextZipCode() {
        return inputTextZipCode;
    }

    public void setInputTextZipCode(HtmlInputText inputTextZipCode) {
        this.inputTextZipCode = inputTextZipCode;
    }

    public HtmlOutputLabel getLabelCity() {
        return labelCity;
    }

    public void setLabelCity(HtmlOutputLabel labelCity) {
        this.labelCity = labelCity;
    }

    public HtmlOutputLabel getLabelConfirmPassword() {
        return labelConfirmPassword;
    }

    public void setLabelConfirmPassword(HtmlOutputLabel labelConfirmPassword) {
        this.labelConfirmPassword = labelConfirmPassword;
    }

    public HtmlOutputLabel getLabelCountry() {
        return labelCountry;
    }

    public void setLabelCountry(HtmlOutputLabel labelCountry) {
        this.labelCountry = labelCountry;
    }

    public HtmlOutputLabel getLabelMail() {
        return labelMail;
    }

    public void setLabelMail(HtmlOutputLabel labelMail) {
        this.labelMail = labelMail;
    }

    public HtmlOutputLabel getLabelNSP() {
        return labelNSP;
    }

    public void setLabelNSP(HtmlOutputLabel labelNSP) {
        this.labelNSP = labelNSP;
    }

    public HtmlOutputLabel getLabelNameAdministrator() {
        return labelNameAdministrator;
    }

    public void setLabelNameAdministrator(HtmlOutputLabel labelNameAdministrator) {
        this.labelNameAdministrator = labelNameAdministrator;
    }

    public HtmlOutputLabel getLabelNumber() {
        return labelNumber;
    }

    public void setLabelNumber(HtmlOutputLabel labelNumber) {
        this.labelNumber = labelNumber;
    }

    public HtmlOutputLabel getLabelPassword() {
        return labelPassword;
    }

    public void setLabelPassword(HtmlOutputLabel labelPassword) {
        this.labelPassword = labelPassword;
    }

    public HtmlOutputLabel getLabelPhone() {
        return labelPhone;
    }

    public void setLabelPhone(HtmlOutputLabel labelPhone) {
        this.labelPhone = labelPhone;
    }

    public HtmlOutputLabel getLabelProvince() {
        return labelProvince;
    }

    public void setLabelProvince(HtmlOutputLabel labelProvince) {
        this.labelProvince = labelProvince;
    }

    public HtmlOutputLabel getLabelStreetAndNumber() {
        return labelStreetAndNumber;
    }

    public void setLabelStreetAndNumber(HtmlOutputLabel labelStreetAndNumber) {
        this.labelStreetAndNumber = labelStreetAndNumber;
    }

    public HtmlOutputLabel getLabelSurname1() {
        return labelSurname1;
    }

    public void setLabelSurname1(HtmlOutputLabel labelSurname1) {
        this.labelSurname1 = labelSurname1;
    }

    public HtmlOutputLabel getLabelSurname2() {
        return labelSurname2;
    }

    public void setLabelSurname2(HtmlOutputLabel labelSurname2) {
        this.labelSurname2 = labelSurname2;
    }

    public HtmlOutputLabel getLabelUserLogin() {
        return labelUserLogin;
    }

    public void setLabelUserLogin(HtmlOutputLabel labelUserLogin) {
        this.labelUserLogin = labelUserLogin;
    }

    public HtmlOutputLabel getLabelZipCode() {
        return labelZipCode;
    }

    public void setLabelZipCode(HtmlOutputLabel labelZipCode) {
        this.labelZipCode = labelZipCode;
    }

    public HtmlCommandButton getBtnCreateUser() {
        return btnCreateUser;
    }

    public void setBtnCreateUser(HtmlCommandButton btnCreateUser) {
        this.btnCreateUser = btnCreateUser;
    }


}
